package test;

import net.ftng.commons.lang.utils.MathUtils;
import net.ftng.core.bean.Generator;

public class Produce {

    String id;

    Double price;

    public Produce(final String id, final Double price) {

        this.id = id;
        this.price = price;
    }

    @Override
    public String toString() {

        return "Produce [id=" + id + ", price=" + price + "$]";
    }

    public static Generator<Produce> generator = new Generator<Produce>() {

        private Integer count = 0;

        @Override
        public Produce next() {

            return new Produce(String.format("Test-%s", count++), MathUtils.randomDouble() * 1000);
        }

    };
}
